package com.opc.controller;

import com.opc.mapper.DeviceRecordMapper;
import com.opc.service.DeviceService;
import com.opc.utils.ApiResult;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author 作者
 * @since 2023-03-13
 */
@Slf4j
@RestController
@RequestMapping("/abnormal")
@CrossOrigin("*")
public class AbnormalController {

    @Autowired
    private DeviceService deviceService;
    @GetMapping("/pro_line")
    public ApiResult getAbnormalStatistic() {
        return ApiResult.success(deviceService.getAbnormalStatistic());
    }


}
